-- GENERATED SPELL FOR [Cursed Sailor] --


function spell0_1157(pUnit, Event) --@Curse of the Eye,n/a--
pUnit:FullCastSpellOnTarget(3360,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1157', 609, 1)
end

function spell1_1157(pUnit, Event) --@Curse of the Eye,n/a--
pUnit:FullCastSpellOnTarget(10651,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1157', 618, 1)
end

function spell2_1157(pUnit, Event) --@Curse of the Eye,n/a--
pUnit:FullCastSpellOnTarget(10653,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1157', 622, 1)
end

function Sorts_1157(pUnit, Event)
local choix_sorts_1157 = math.random(0, 2)
if choix_sorts_1157 == 0 then
pUnit:RegisterEvent('spell0_1157', 1, 1)
end
if choix_sorts_1157 == 1 then
pUnit:RegisterEvent('spell1_1157', 1, 1)
end
if choix_sorts_1157 == 2 then
pUnit:RegisterEvent('spell2_1157', 1, 1)
end
end

function mob1157_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1157', math.random(1500, 3000), 1)
end

function mob1157_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1157_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1157_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1157, 1, 'mob1157_Action')
RegisterUnitEvent(1157, 2, 'mob1157_Leave')
RegisterUnitEvent(1157, 3, 'mob1157_Kill')
RegisterUnitEvent(1157, 4, 'mob1157_Die')
